package com.cake.entity;
import java.math.BigDecimal;
import java.util.Date;

import com.cake.entity.base.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;

public class XxOrderItem extends BaseEntity {
    /**
     * 订单详情主键
     * 表字段 : xx_order_item.id
     */
    private Long id;

    /**
     * 订单主键
     * 表字段 : xx_order_item.order
     */
    private Long order;

    /**
     * 商品编号
     * 表字段 : xx_order_item.sn
     */
    private String sn;

    /**
     * 商品主键
     * 表字段 : xx_order_item.product
     */
    private Long product;

    /**
     * 商品名称
     * 表字段 : xx_order_item.name
     */
    private String name;

    /**
     * 商品全称
     * 表字段 : xx_order_item.full_name
     */
    private String fullName;

    /**
     * 商品价格
     * 表字段 : xx_order_item.price
     */
    private BigDecimal price;

    /**
     * 商品缩略图地址
     * 表字段 : xx_order_item.thumbnail
     */
    private String thumbnail;

    /**
     * 商品是否为赠品
     * 表字段 : xx_order_item.is_gift
     */
    private Boolean isGift;

    /**
     * 商品项数量
     * 表字段 : xx_order_item.quantity
     */
    private Integer quantity;

    /**
     * 已发货数量
     * 表字段 : xx_order_item.shipped_quantity
     */
    private Integer shippedQuantity;

    /**
     * 已退货数量
     * 表字段 : xx_order_item.return_quantity
     */
    private Integer returnQuantity;

    /**
     * 商品备注：包含附送的赠品信息
     * 表字段 : xx_order_item.intro
     */
    private String intro;

    /**
     * 配送方式（全国配送，仅限成都配送）
     * 表字段 : xx_order_item.send_type
     */
    private String sendType;

    /**
     * 若来自购物车，则需要保存购物车id
     * 表字段 : xx_order_item.cart_id
     */
    private String cartId;

    /**
     * 净含量
     * 表字段 : xx_order_item.weight
     */
    private Integer weight;

    /**
     * 订单详情创建时间
     * 表字段 : xx_order_item.create_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createDate;

    /**
     * 订单详情最新修改时间
     * 表字段 : xx_order_item.modify_date
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date modifyDate;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table xx_order_item
     *
     * @mbg.generated
     */
    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getOrder() {
        return order;
    }

    public void setOrder(Long order) {
        this.order = order;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn == null ? null : sn.trim();
    }

    public Long getProduct() {
        return product;
    }

    public void setProduct(Long product) {
        this.product = product;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName == null ? null : fullName.trim();
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getThumbnail() {
        return thumbnail;
    }

    public void setThumbnail(String thumbnail) {
        this.thumbnail = thumbnail == null ? null : thumbnail.trim();
    }

    public Boolean getIsGift() {
        return isGift;
    }

    public void setIsGift(Boolean isGift) {
        this.isGift = isGift;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public Integer getShippedQuantity() {
        return shippedQuantity;
    }

    public void setShippedQuantity(Integer shippedQuantity) {
        this.shippedQuantity = shippedQuantity;
    }

    public Integer getReturnQuantity() {
        return returnQuantity;
    }

    public void setReturnQuantity(Integer returnQuantity) {
        this.returnQuantity = returnQuantity;
    }

    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro == null ? null : intro.trim();
    }

    public String getSendType() {
        return sendType;
    }

    public void setSendType(String sendType) {
        this.sendType = sendType == null ? null : sendType.trim();
    }

    public String getCartId() {
        return cartId;
    }

    public void setCartId(String cartId) {
        this.cartId = cartId == null ? null : cartId.trim();
    }

    public Integer getWeight() {
        return weight;
    }

    public void setWeight(Integer weight) {
        this.weight = weight;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Date getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(Date modifyDate) {
        this.modifyDate = modifyDate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", order=").append(order);
        sb.append(", sn=").append(sn);
        sb.append(", product=").append(product);
        sb.append(", name=").append(name);
        sb.append(", fullName=").append(fullName);
        sb.append(", price=").append(price);
        sb.append(", thumbnail=").append(thumbnail);
        sb.append(", isGift=").append(isGift);
        sb.append(", quantity=").append(quantity);
        sb.append(", shippedQuantity=").append(shippedQuantity);
        sb.append(", returnQuantity=").append(returnQuantity);
        sb.append(", intro=").append(intro);
        sb.append(", sendType=").append(sendType);
        sb.append(", cartId=").append(cartId);
        sb.append(", weight=").append(weight);
        sb.append(", createDate=").append(createDate);
        sb.append(", modifyDate=").append(modifyDate);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}